package com.eastfair.questionnaire.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.core.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 实体类
 * 问卷，支持跳题
 * </p>
 *
 * @author yuwx
 * @since 2021-08-18
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "DynamicQuestionnaireVO", description = "问卷，支持跳题")
@AllArgsConstructor
public class DynamicQuestionnaireVO extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;

    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 项目ID
     */
    @ApiModelProperty(value = "项目ID")

    @Excel(name = "项目ID")
    private Long projectId;

    /**
     * 问卷名
     */
    @ApiModelProperty(value = "问卷名")

    @Excel(name = "问卷名")
    private String name;

    /**
     * 问卷英文名名
     */
    @ApiModelProperty(value = "问卷英文名名")

    @Excel(name = "问卷英文名名")
    private String enName;

    /**
     * 是否生效(默认1：可用 0:不可用)
     */
    @ApiModelProperty(value = "是否生效(默认1：可用 0:不可用)")

    @Excel(name = "是否生效(默认1：可用 0:不可用)", replace = {"是_true", "否_false", "_null"})
    private Integer isEnabled;

    /**
     * 是否删除(默认0：未删除 1:已删除)
     */
    @ApiModelProperty(value = "是否删除(默认0：未删除 1:已删除)")

    @Excel(name = "是否删除(默认0：未删除 1:已删除)", replace = {"是_true", "否_false", "_null"})
    private Integer isDeleted;
    /**
     * 问题列表
     */
    @ApiModelProperty(value = "第一题id")

    @Excel(name = "第一题Id")
    private Long firstQuestionId;
    /**
     * 问题池（key:问题id， value:问题）
     */
    @ApiModelProperty(value = "问题池（key:问题id， value:问题）")
    @Excel(name = "问题池（key:问题id， value:问题）")
    private Map<Long, QuestionVO> questionMap;
}
